package cn.iocoder.yudao.module.todo.dal.mysql.tasksparticipants;

import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.module.todo.controller.admin.tasks.vo.TasksParticipantsPageReqVO;
import cn.iocoder.yudao.module.todo.dal.dataobject.tasksparticipants.TasksParticipantsDO;
import org.apache.ibatis.annotations.Mapper;


/**
 * 待办任务参与者 Mapper
 *
 * @author 芋道源码
 */
@Mapper
public interface TasksParticipantsMapper extends BaseMapperX<TasksParticipantsDO> {

    default PageResult<TasksParticipantsDO> selectPage(TasksParticipantsPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<TasksParticipantsDO>()
                .eqIfPresent(TasksParticipantsDO::getTaskId, reqVO.getTaskId())
                .eqIfPresent(TasksParticipantsDO::getUserId, reqVO.getUserId())
                .orderByDesc(TasksParticipantsDO::getTaskId));
    }

}